import {createRouter,createWebHashHistory} from "vue-router"

const routes = [
	{//首页
		path:'/',
		name:'index',
		component:()=>import('@/page/index/index.vue'),
		meta:{
		    keepAlive: true //此页面需要缓存
		}
	},
	{//目的地
		path:'/found',
		name:'found',
		component:()=>import('@/page/found/found.vue'),
		meta:{
		    keepAlive: true //此页面需要缓存
		}
	},
	{//发布
		path:'/publish',
		name:'publish',
		component:()=>import('@/page/publish/publish.vue'),
		meta:{
			keepAlive: true //此页面需要缓存
		}
	},
	{//我的
		path:'/mine',
		name:'mine',
		component:()=>import('@/page/mine/mine.vue'),
		meta:{
			keepAlive: true //此页面需要缓存
		}
	},
	{//旅游攻略详情页
		path:'/details-page',
		name:'details-page',
		component:()=>import('@/page/details-page/details.vue')
	},
	{//编辑资料
		path:'/personal',
		name:'personal',
		component:()=>import('@/page/personal-data/personal.vue')
	},
	{//目的地搜索
		path:'/search-city',
		name:'search-city',
		component:()=>import('@/page/search-city/city.vue'),
		meta:{
			keepAlive: false //此页面需要缓存
		}
	},
	{//密码设置
		path:'/password',
		name:'password',
		component:()=>import('@/page/password-settings/password.vue')
	},
	{//游记搜索
		path:'/search-travel',
		name:'search-travel',
		component:()=>import('@/page/search-travel/search.vue')
	},
	{//公用查询游记页面
		path:'/query-travel',
		name:'query-travel',
		component:()=>import('@/page/Query-travel/travel.vue')
	},
	{//客户订单
		path:'/upload-orderid',
		name:'upload-orderid',
		component:()=>import('@/page/Upload-orderid/orderid.vue')
	},
	{//我的关注
		path:'/my-concern',
		name:'my-concern',
		component:()=>import('@/page/my-concern/concern.vue'),
		meta:{
			keepAlive: false //此页面需要缓存
		}
	},
	{//买票
		path:'/ticket',
		name:'ticket',
		component:()=>import('@/page/buy-a-ticket/ticket.vue')
	},
	{//结伴
		path:'/companion',
		name:'companion',
		component:()=>import('@/page/companion/companion.vue')
	},
	{//结伴详情
		path:'/partner-details',
		name:'partner-details',
		component:()=>import('@/page/companion/partner-details.vue')
	},
	{//发起结伴
		path:'/Init-partner',
		name:'Init-partner',
		component:()=>import('@/page/companion/Init-partner.vue')
	},
	{//我的活动
		path:'/my-activities',
		name:'my-activities',
		component:()=>import('@/page/companion/my-activities.vue')
	},
	{//管理成员
		path:'/managing-member',
		name:'managing-member',
		component:()=>import('@/page/companion/managing-member.vue')
	},
]

const router = createRouter({
  // 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHashHistory(),
  routes
})

router.beforeEach((to, from, next) => {
  
  next(); 
})

export default router